<%@page import="helpers.LanguageHelper"%>
<%@page import="helpers.UrlHelper"%>
<%@page import="entities.SiteConfig"%>
<%
String name = (String) request.getAttribute("name");
SiteConfig configs = (SiteConfig) request.getAttribute("config");

//Set content for seo
String nameServer = UrlHelper.getDomainServer(request);
String title = LanguageHelper.getString("gsearch_page") + " " + name + " - " + nameServer;
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="/layouts/header.jsp">
	<jsp:param name="title" value="<%=title %>" />
    <jsp:param name="ogtitle" value="<%=title %>" />
</jsp:include>
            
            <div id="mainContent" class="left">
            	<div id="errorPage">
                	<h3 class="title"><%=LanguageHelper.getString("gsearch_page")%> <%=name %>: </h3>
                    <!-- search -->
					<form action="/search" id="cse-main-search-box">
						<input type="hidden" name="cx" value="<%=configs.getCxGoogleSearch() %>" /> 
						<input type="hidden" name="cof" value="FORID:10" /> 
						<input type="hidden" name="ie" value="UTF-8" /> 
						<input id="cse-main-search-text" type="text" name="q" autocomplete="on" class="input_search" size="55"/> 
						<input type="submit" name="sa" value="Search" />
					</form>
					<script type="text/javascript" src="//www.google.com/jsapi"></script>	
					<script type="text/javascript">
						google.load('search', '1');
						google.setOnLoadCallback(function() {
							google.search.CustomSearchControl.attachAutoCompletionWithOptions(
									'013315504628135767172:d6shbtxu-uo+qptype:1', document
											.getElementById('cse-main-search-text'),
									'cse-main-search-box', {
										'styleOptions' : {
											'widthOffset' : 150
										}
									});
						});
					</script>
					<div id="cse-search-results"></div>
					<script type="text/javascript">
					  var googleSearchIframeName = "cse-search-results";
					  var googleSearchFormName = "cse-search-box";
					  var googleSearchDomain = "www.google.com";
					  var googleSearchPath = "/cse";
					  var googleSearchFrameHeight = 1300;
					  var googleSearchResizeIframe = true;
					</script>
					<script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>

					<!-- end search -->		
                </div>
            </div>
            
            <jsp:include page="/elements/right.jsp" />
            
            <div class="clearbreak"></div>
<jsp:include page="/layouts/footer.jsp" />